#include "stdafx.h"
#include <boost/random/uniform_real.hpp>
#include <boost/random/variate_generator.hpp>
#include "Random.h"

CRandom::CRandom()
{
	m_randomNumberGenerator.seed(static_cast<unsigned int>(std::time(0)));
}

CRandom::~CRandom()
{

}

DATA_TYPE CRandom::GetRandomFloat(DATA_TYPE fMin, DATA_TYPE fMax)
{
	boost::uniform_real<DATA_TYPE> u(fMin, fMax);
	boost::variate_generator<boost::minstd_rand&, boost::uniform_real<DATA_TYPE>> gen(m_randomNumberGenerator, u);
	return gen();
}